package com.fuxian.service;

import java.sql.Timestamp;
import java.util.List;

import com.fuxian.model.News;

public interface NewsService {

	/**
	 * add news
	 * @param news
	 */
	public abstract void addNews(News news);
	
	/**
	 * delete news by id
	 * @param id
	 */
	public abstract void deleteNewsById(int id);
	
	/**
	 * modify news
	 * @param news
	 */
	public abstract void modifyNews(News news);
	
	/**
	 * select news by id 
	 * @param id
	 * @return
	 */
	public abstract News selectNewsById(int id);
	
	/**
	 * select news by author
	 * @param author
	 * @param start
	 * @param size
	 * @return
	 */
	public abstract List<News> selectNewsByAuthor(String author,int start,int size);
	
	/**
	 * select news by author
	 * @param author
	 * @return
	 */
	public abstract List<News> selectNewsByAuthor(String author);
	
	/**
	 * select news by createtime
	 * @param createTime
	 * @param start
	 * @param size
	 * @return
	 */
	public abstract List<News>selectNewsByCreatetime(Timestamp createTime,int start,int size);
	
	/**
	 * select news by createtime
	 * @param createTime
	 * @return
	 */
	public abstract List<News>selectNewsByCreatetime(Timestamp createTime);
	
	/**
	 * select all news
	 * @param start
	 * @param size
	 * @return
	 */
	public abstract List<News> selectAllNews(int start,int size);
	
	/**
	 * select all news
	 * @return
	 */
	public abstract List<News> selectAllNews();
	
	public abstract int selectCount();
}
